package io.github.bigbird0101.youyishi.code.event;

import io.github.bigbird0101.youyishi.code.GenerateCodeParam;


/**
 * 生成代码失败
 * @author m15179835326@163.com
 * @date 2023-05-12 11:06
 */
public class GenerateFailedEvent extends CodeEvent {
    private final Throwable throwable;
    public GenerateFailedEvent(GenerateCodeParam generateCodeParam, Throwable throwable) {
        super(generateCodeParam);
        this.throwable=throwable;
    }
    @Override
    public GenerateCodeParam getSource() {
        return (GenerateCodeParam) super.getSource();
    }

    public Throwable getThrowable() {
        return throwable;
    }
}
